home *** CD-ROM | disk | FTP | other *** search
/ ProPhone 1993 Q4 - Mid-Atlantic / ProPhone 1993 Q4 - Mid-Atlantic.iso / install2 / install / inscript.eng next >
Text File  |  1993-07-01  |  12KB  |  530 lines

  1. ; ProCD (PR1) Installation Script
  2. ; <<DPR>> Sep 04 1991 SPD angepaßt an DPR                               hg
  3. ; <<SPD>> Dec 07 1990;1.00                      dw
  4. ; <<SPD>> Nov 11 1990;1.00                      ak
  5. ; Modified From:
  6. ; CD Answer Installation Script - Generic                               jdk
  7. ; <<CDA>> Aug 15 1990;2.02
  8.  
  9. ; single/multiple disk version
  10. ;
  11. ;    The first disk must contain the \INSTALL directory.
  12. ;    This contains the general system files for the install
  13. ;    process and may be repeated on disk #2, etc.
  14. ;    The application specific files are kept in a directory
  15. ;    named 'DISK1'. If additional disks are required, create
  16. ;    an (empty) file on the current disk named '\MORE' and
  17. ;    put the overflow files in a directory named \DISK2 (3, 4, ...).
  18.  
  19.  
  20.  
  21. BREAK Abort_Install
  22.  
  23.  
  24.  
  25. ;>>> Initialization/Defaults Setup
  26. GOSUB Initialize
  27.  
  28.  
  29.  
  30. ;>>> Start-up screen
  31. GOSUB TitleScreen
  32.  
  33.  
  34.  
  35. ;>>> Get installation destination path
  36. GOSUB Install_Where
  37.  
  38.  
  39.  
  40. CD <DestDrive>\
  41. IF NOT DIREXISTS <DestPath> GOTO skipMenu
  42. IF NOT EXISTS <DestPath>\<Product_Name>.EXE GOTO skipMenu
  43.  
  44.  
  45.  
  46. ;>>> Install menu - install, remove, alter, abort
  47. GOTO PreExistsMenu
  48.  
  49.  
  50.  
  51. :skipMenu
  52.  
  53. ;>>> Create Product Destination Directory
  54. GOSUB MakeDir
  55.  
  56.  
  57.  
  58. :DestDirExists
  59.  
  60.  
  61. SET DriverOk = N
  62. ;>>> Use Microsoft Extensions?
  63. ;GOSUB Mscdex_Option
  64. GOSUB Mscdex_Only
  65.  
  66.  
  67.  
  68.  
  69. ;>>> Device Drivers Menu
  70. ;>>> use menu only, if mscdex not used
  71. IF "<DriverOk>"=="Y" GOTO use_msc
  72. GOSUB DevDrivers
  73. :use_msc
  74.  
  75.  
  76. IF "<alter>"=="Y" GOTO Alter_Only
  77.  
  78.  
  79.  
  80. ;>>> Copy all product files and report when finished
  81. GOSUB CopyDisks
  82. GOSUB Config_And_Message
  83. WAIT
  84.  
  85.  
  86.  
  87. ;>>> All done
  88. GOTO Script_Exit
  89.  
  90.  
  91.  
  92. ;****************************************************************************
  93. ;Initialization/Defaults
  94.  
  95. :Initialize
  96.  
  97.  
  98. ; here are some defaults:
  99.  
  100. SET Product_ID = PR6
  101. SET Product_Name = PROCDB
  102. ;  default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
  103. SET def_driver = FS_STD
  104. SET scr_type = SC_STD
  105. CONFIG Screen = "<scr_type>=<extra>"
  106. SET def_lang = <$Language>
  107. CONFIG Language = "<def_lang>"
  108. SET CfgFileName = <Product_ID>SETUP.CFG
  109.  
  110.  
  111. ; install disk
  112. PARSE_PATH <$ProgDir>
  113. SET FromDrive = <$Drive>
  114. SET curdisk = 1
  115. GOSUB Disk_Insert
  116.  
  117.  
  118. ;  default destination drive
  119. PARSE_PATH <$CurDir>
  120. SET DestDrive = C:
  121. ;what is the purpose of this (following line)???
  122. ;;;;IF NOT "<$Drive>"=="<FromDrive>" DO SET def_def = <$Drive>
  123.  
  124. ; default dest directory
  125. PARSE_PATH <DestDrive>\<Product_Name>
  126. SET DestDir = <$Dir>
  127.  
  128.  
  129. RETURN
  130.  
  131.  
  132.  
  133. ;****************************************************************************
  134. ; Display Initial Installation Screen
  135.  
  136. :TitleScreen
  137.  
  138.  
  139. CLEAR
  140. TEXT \n                             ProPhone 1993\n\n
  141. ----                           Business Directory\n\n
  142. ----                          Software Version 2.2\n\n\n\n\n\n
  143. ----                    Installation (Part 2 - Business):
  144. WAIT
  145.  
  146. RETURN
  147.  
  148.  
  149.  
  150. ;****************************************************************************
  151. :Install_Where
  152.  
  153.  
  154. CLEAR
  155. TEXT The retrieval software must be installed on your hard disk or on a
  156. ---- formatted floppy disk. The standard values are drive <DestDrive> (normally
  157. ---- the hard disk), and a subdirectory named <DestDir>. To use these values,
  158. ---- press the ┘ (Enter) key twice. To alter them, type the new drive or
  159. ---- subdirectory at the appropriate prompt, then type ┘ (Enter).
  160.  
  161. INPUT 6,6,5 DestDrive = Install on drive     ?
  162. INPUT 6,8,40 DestDir = Install in directory ?
  163. SET DestPath = <DestDrive><DestDir>
  164.  
  165. IF "<DestDrive>"=="" GOTO BadDestDir
  166. IF "<DestDir>"=="\" GOTO BadDestDir
  167. IF "<DestDir>"=="" GOTO BadDestDir
  168. IF NOT DIREXISTS <DestDrive>\ GOTO BadDestDir
  169.  
  170. RETURN
  171.  
  172.  
  173.  
  174. ;****************************************************************************
  175. :BadDestDir
  176.  
  177.  
  178. CLEAR
  179. TEXT \nError -\n\n
  180. ----  The path "<DestDrive><DestDir>" is not allowed!\n
  181. ----There must be both a drive and a valid subdirectory name in order
  182. ---- to install the software.
  183. WAIT
  184.  
  185. GOTO Install_Where
  186.  
  187.  
  188.  
  189. ;****************************************************************************
  190. :PreExistsMenu
  191.  
  192.  
  193. CLEAR
  194. TEXT The directory "<DestPath>" already exists.
  195. NEWMENU ?, 3, 54
  196. MENU Remove the old version; install new version
  197. MENU Remove the old version; do not install new software
  198. MENU Alter configuration; do not copy software
  199. MENU Stop the installation without making any changes
  200.  
  201.  
  202. CHOICE 1
  203. GOSUB Replace_Delete
  204. GOTO DestDirExists
  205.  
  206. CHOICE 2
  207. GOSUB Total_Delete
  208. GOTO Script_Exit
  209.  
  210. CHOICE 3
  211. SET alter = Y
  212. IF NOT EXISTS <DestPath>\<CfgFileName> GOTO no_config
  213. DISP 5,14 Reading configuration...
  214. READCONFIG <DestPath>\<CfgFileName>
  215. :no_config
  216. GOTO DestDirExists
  217.  
  218. CHOICE 4
  219. GOTO Script_Exit
  220. ENDCHOICES
  221.  
  222.  
  223.  
  224. ;****************************************************************************
  225. :Replace_Delete
  226.  
  227.  
  228. CLEAR
  229. TEXT Deleting previous contents of <DestPath>...
  230. ; DEL <DestPath>\*.*
  231. ; DEL <DestPath>\*.
  232.  DEL <DestPath>\<Product_Name>.EXE
  233.  DEL <DestPath>\<Product_ID>HELP.HLP
  234.  DEL <DestPath>\<Product_ID>MSGS.*
  235. ; DEL <DestPath>\<Product_ID>DIAL.*
  236. ; DEL <DestPath>\<Product_ID>PRINT.*
  237.  DEL <DestPath>\FS_*.DRV
  238.  DEL <DestPath>\SC_*.DRV
  239.  
  240. RETURN
  241.  
  242.  
  243.  
  244. ;****************************************************************************
  245. :Total_Delete
  246.  
  247.  
  248. CLEAR
  249. TEXT Removing <DestPath> directory...
  250. ; DEL <DestPath>\*.*
  251. ; DEL <DestPath>\*.
  252.  DEL <DestPath>\<Product_Name>.*
  253.  DEL <DestPath>\<Product_ID>HELP.*
  254.  DEL <DestPath>\<Product_ID>MSGS.*
  255.  DEL <DestPath>\<Product_ID>*.CFG
  256. ; DEL <DestPath>\<Product_Name>.EXE
  257. ; DEL <DestPath>\<Product_ID>HELP.HLP
  258. ; DEL <DestPath>\<Product_ID>MSGS.*
  259. ; DEL <DestPath>\<Product_ID>DIAL.CFG
  260. ; DEL <DestPath>\<Product_ID>PRINT.CFG
  261. ; DEL <DestPath>\<Product_ID>SETUP.CFG
  262.  DEL <DestPath>\FS_*.DRV
  263.  DEL <DestPath>\SC_*.DRV
  264. ; SD only; DEL <DestPath>\NOTES\*.*
  265. ; SD only; DEL <DestPath>\NOTES\*.
  266. ; SD only; DEL <DestPath>\SWAP\*.*
  267. ; SD only; DEL <DestPath>\SWAP\*.
  268. ; SD only; RD <DestPath>\NOTES
  269. ; SD only; RD <DestPath>\SWAP
  270. IF NOT EXISTS <DestPath>\*.* GOTO remdest
  271.  
  272. TEXT <DestPath> directory has unknown files, directory not removed!!
  273. WAIT
  274. GOTO norem
  275.  
  276. :remdest
  277. RD <DestPath>
  278.  
  279. :norem
  280. DEL <DestDrive>\<Product_Name>.BAT
  281.  
  282. RETURN
  283.  
  284.  
  285.  
  286. ;****************************************************************************
  287. :Alter_Only
  288.  
  289.  
  290. CLEAR
  291. TEXT Updating Configuration
  292. WRITECONFIG <DestPath>\<CfgFileName>
  293. TEXT \n  Configuration Update complete!\n\n
  294. WAIT
  295. GOTO Script_Exit
  296.  
  297.  
  298.  
  299. ;****************************************************************************
  300. ; Create the destination directory
  301.  
  302. :MakeDir
  303.  
  304.  
  305. MD <DestPath>
  306. IF DIREXISTS <DestPath> GOTO okpath
  307.  
  308. ; Invalid destination directory -> ask again
  309. ; Will this work? - BadDestDir has no return but GOTO's a GOSUB with a return
  310. GOSUB BadDestDir
  311. GOTO MakeDir
  312.  
  313. :okpath
  314. ; SD only; MD <DestPath>\NOTES
  315. ; SD only; MD <DestPath>\SWAP
  316.  
  317. RETURN
  318.  
  319.  
  320.  
  321. ;****************************************************************************
  322. ; Device Driver Selection
  323.  
  324. :DevDrivers
  325.  
  326.  
  327. HSCOUNT hs
  328. IF NOT <hs>==0 GOTO have_hs
  329.  
  330. ; No CDROM device drivers are loaded
  331. GOSUB DevDrivers_None
  332.  
  333. :have_hs
  334.  
  335. SET msg =
  336. IF <hs>==1 GOTO instOne
  337.  
  338. ; SET multi_drivers = Y
  339.  
  340. TEXT A selection of CD-ROM device drivers are installed (see CONFIG.SYS):\n\n
  341. ----Select the desired CD-ROM device driver from this list of available
  342. ---- device drivers using the  and  keys. Press ┘ (Enter) when ready.\n
  343. ----Press Esc to abort installation.
  344. GOTO instMore
  345.  
  346. :instOne
  347. SET msg = A CD-ROM device driver is installed (see CONFIG.SYS):\n\n
  348.  
  349. :instMore
  350. HSDRIVER hsname = 25, 6
  351. CONFIG Driver = "<def_driver>=<hsname>"
  352. CLEAR
  353. TEXT <msg>The CD-ROM device driver selected is named "<hsname>". If this is not
  354. ---- correct, press Esc to abort the installation and check your CONFIG.SYS
  355. ---- file.\n\n
  356. WAIT
  357.  
  358. ; IF NOT "<multi_drivers>" == "Y"  GOTO done_multi_drivers
  359. ; CLEAR
  360. ; TEXT This product is a multiple disc product.  Do you wish to use additional
  361. ; ---- CD-ROM drives
  362.  
  363. ; :done_multi_drivers
  364.  
  365. RETURN
  366.  
  367.  
  368.  
  369. ;*************************************************